package top.healthylife.gateway.platform.fh.dto.unify.req;


import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * @author : GaoZeXi
 * @date 2021/11/1 11:24
 */
@EqualsAndHashCode(callSuper = true)
@Data
@Accessors(chain = true)
@ApiModel("法海企业查询统一入参")
public abstract class FhReqBusinessQueryUnifyDto extends FhReqQueryUnifyDto  {
    @ApiModelProperty(value = "搜索关键词", example = "小米", required = true)
    protected String keyword;

    @ApiModelProperty(value = "数据类型", example = "", required = false,notes = "具体参数见子类枚举")
    protected String dataType;

    /**
     * 校验子类的dataType是否合法
     */
    public void checkDataType(){
        checkDataType(this.dataType);
    }

    /**
     * 校验参数的dataType是否合法
     *
     * @param dataType 数据类型
     */
    public abstract void checkDataType(String dataType);
}
